#!/bin/sh

# TODO: Explanations.

# tl;dr:
# 1. Tmux makes things easier, it helps the cli program (server) alive 
#    and avoids unexpected ssh disconnection.
# 2. It requires you to learn some basics to use it, here's the simple:
#    prefix key: just think it like a Windows key or alt key (ctrl+b)
#    detach: aka minimize. the program is running (prefix+d)
#    attach: detached session can be reattach by: tmux a (last session)

# Create a new sessiom then detach
tmux new -d -s mc
# Send certain command to session
tmux send-keys -t mc:0.0 "./startmc.sh" ENTER
# Reattch the specificed session
tmux a -t mc:0.0
